package mtt.us.domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author   hyphen
 */
@Entity
@Table(name="termin")
public class Termin {

	/**
	 * Index "Freitag" für den Week.hashtableDays
	 */
	public static final int DAY_FRIDAY = 4;
	
	/**
	 * Index "Montag" für den Week.hashtableDays
	 */
	public static final int DAY_MONDAY = 0;

	/**
	 * Index "Samstag" für den Week.hashtableDays
	 */
	public static final int DAY_SATURDAY = 5;

	/**
	 * Index "Sonntag" für den Week.hashtableDays
	 */
	public static final int DAY_SUNDAY = 6;

	/**
	 * Index "Donnerstag" für den Week.hashtableDays
	 */
	public static final int DAY_THURSDAY = 3;

	/**
	 * Index "Dienstag" für den Week.hashtableDays
	 */
	public static final int DAY_TUESDAY = 1;

	/**
	 * Index "Mittwoch" für den Week.hashtableDays
	 */
	public static final int DAY_WEDNESDAY = 2;

	/**
	 * Definiert den Index für den Intervall "in geraden Wochen"
	 */
	public static final int INTERVALL_EVEN_WEEKS = 1;

	/**
	 * Definiert den Index für den Intervall "in ungeraden Wochen"
	 */
	public static final int INTERVALL_UNEVEN_WEEKS = 2;

	/**
	 * Definiert den Index für den Intervall "wöchentlich"
	 */
	public static final int INTERVALL_WEEKLY = 0;

	/**
	 * das Event findet von 07:00 - 09:00 Uhr statt
	 */
	public static final int TIME_07To09 = 0;

	/**
	 * das Event findet von 09:00 - 11:00 Uhr statt
	 */
	public static final int TIME_09To11 = 1;

	/**
	 * das Event findet von 11:00 - 13:00 Uhr statt
	 */
	public static final int TIME_11To13 = 2;

	/**
	 * das Event findet von 13:00 - 15:00 Uhr statt
	 */
	public static final int TIME_13To15 = 3;

	/**
	 * das Event findet von 15:00 - 17:00 Uhr statt
	 */
	public static final int TIME_15To17 = 4;

	/**
	 * das Event findet von 17:00 - 19:00 Uhr statt
	 */
	public static final int TIME_17To19 = 5;
	/**
	 * das Event findet von 19:00 - 21:00 Uhr statt
	 */
	public static final int TIME_19To21 = 6;
	/**
	 * Definiert den Index für den Typ "Praktikum Obligatorisch"
	 */
	public static final int TYP_PO = 2;
	/**
	 * Definiert den Index für den Typ "Praktikum Wahlpflicht"
	 */
	public static final int TYP_PW = 3;
	/**
	 * Definiert den Index für den Typ "Übung Obligatrisch"
	 */
	public static final int TYP_UEO = 4;

	/**
	 * Definiert den Index für den Typ "Vorlesung Obligatorisch"
	 */
	public static final int TYP_VO = 0;

	/**
	 * Definiert den Index für den Typ "Vorlesung Wahlpflicht"
	 */
	public static final int TYP_VW = 1;

	/**
	 * @uml.property  name="id"
	 */
	private int id;
	
	private Stundenplan stundenplan;

	/**
	 * @return
	 * @uml.property  name="id"
	 */
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	/**
	 * @return
	 * @uml.property  name="stundenplan"
	 */
	@ManyToOne
	@JoinColumn(name="stundenplan_id")
	public Stundenplan getStundenplan() {
		return stundenplan;
	}

	/**
	 * @param id
	 * @uml.property  name="id"
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @param stundenplan
	 * @uml.property  name="stundenplan"
	 */
	public void setStundenplan(Stundenplan stundenplan) {
		this.stundenplan = stundenplan;
	}

	/**
	 * enthält den TIME_* Wert für die jeweilige Instanz
	 * @uml.property  name="timeOfEvent"
	 */
	private int timeOfEvent;

	/**
	 * Getter of the property <tt>timeOfEvent</tt>
	 * @return  Returns the timeOfEvent.
	 * @uml.property  name="timeOfEvent"
	 */
	public int getTimeOfEvent() {
		return timeOfEvent;
	}

	/**
	 * Setter of the property <tt>timeOfEvent</tt>
	 * @param timeOfEvent  The timeOfEvent to set.
	 * @uml.property  name="timeOfEvent"
	 */
	public void setTimeOfEvent(int timeOfEvent) {
		this.timeOfEvent = timeOfEvent;
	}

	/**
	 * enthält den Termin.DAY_* Wert für die jeweilige Instanz
	 * @uml.property  name="dayOfEvent"
	 */
	private int dayOfEvent;

	/**
	 * Getter of the property <tt>dayOfEvent</tt>
	 * @return  Returns the dayOfEvent.
	 * @uml.property  name="dayOfEvent"
	 */
	public int getDayOfEvent() {
		return dayOfEvent;
	}

	/**
	 * Setter of the property <tt>dayOfEvent</tt>
	 * @param dayOfEvent  The dayOfEvent to set.
	 * @uml.property  name="dayOfEvent"
	 */
	public void setDayOfEvent(int dayOfEvent) {
		this.dayOfEvent = dayOfEvent;
	}

	/**
	 * enthält den Termin.INTERVALL_* Wert der Instanz
	 * @uml.property  name="IntervallOfEvent"
	 */
	private int intervallOfEvent;

	/**
	 * Getter of the property <tt>IntervallOfEvent</tt>
	 * @return  Returns the intervallOfEvent.
	 * @uml.property  name="IntervallOfEvent"
	 */
	public int getIntervallOfEvent() {
		return intervallOfEvent;
	}

	/**
	 * Setter of the property <tt>IntervallOfEvent</tt>
	 * @param IntervallOfEvent  The intervallOfEvent to set.
	 * @uml.property  name="IntervallOfEvent"
	 */
	public void setIntervallOfEvent(int intervallOfEvent) {
		this.intervallOfEvent = intervallOfEvent;
	}

	/**
	 * enthält den Termin.TYP_* für die Instanz
	 * @uml.property  name="typOfEvent"
	 */
	private int typOfEvent;

	/**
	 * Getter of the property <tt>typOfEvent</tt>
	 * @return  Returns the typOfEvent.
	 * @uml.property  name="typOfEvent"
	 */
	public int getTypOfEvent() {
		return typOfEvent;
	}

	/**
	 * Setter of the property <tt>typOfEvent</tt>
	 * @param typOfEvent  The typOfEvent to set.
	 * @uml.property  name="typOfEvent"
	 */
	public void setTypOfEvent(int typOfEvent) {
		this.typOfEvent = typOfEvent;
	}

	/**
	 * enthält den Namen der Veranstalltung
	 * @uml.property  name="name"
	 */
	private String name = "";

	/**
	 * Getter of the property <tt>name</tt>
	 * @return  Returns the name.
	 * @uml.property  name="name"
	 */
	public String getName() {
		return name;
	}

	/**
	 * Setter of the property <tt>name</tt>
	 * @param name  The name to set.
	 * @uml.property  name="name"
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * enthält den Dozent der Veranstaltung
	 * @uml.property  name="tutor"
	 */
	private String tutor = "";

	/**
	 * Getter of the property <tt>tutor</tt>
	 * @return  Returns the tutor.
	 * @uml.property  name="tutor"
	 */
	public String getTutor() {
		return tutor;
	}

	/**
	 * Setter of the property <tt>tutor</tt>
	 * @param tutor  The tutor to set.
	 * @uml.property  name="tutor"
	 */
	public void setTutor(String tutor) {
		this.tutor = tutor;
	}

	/**
	 * enthält den Ort an dem die Veranstaltung stattfindet
	 * @uml.property  name="ort"
	 */
	private String ort = "";

	/**
	 * Getter of the property <tt>ort</tt>
	 * @return  Returns the ort.
	 * @uml.property  name="ort"
	 */
	public String getOrt() {
		return ort;
	}

	/**
	 * Setter of the property <tt>ort</tt>
	 * @param ort  The ort to set.
	 * @uml.property  name="ort"
	 */
	public void setOrt(String ort) {
		this.ort = ort;
	}
}
